fix(ssh): loosen agent server keep-alive to survive brief network stalls - #760
Conversation
The host agent SSH server closed the transport after ~10s (5s x 2) of missed keep-alives, far stricter than OpenSSH, so short network stalls tore down the tunnel and the user's SSH session. Default the tolerance to ~120s (15s x 8, OpenSSH-like) and make it configurable via DEVSY_SSH_KEEPALIVE_INTERVAL and DEVSY_SSH_KEEPALIVE_COUNT_MAX. Fixes #759
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
👷 Deploy Preview for images-devsy-sh processing.
|
✅ Deploy Preview for images-devsy-sh canceled.
|
✅ Deploy Preview for devsydev canceled.
|
Fixes #759
Summary
The host agent SSH server (
NewServer, run asssh-server --stdio— the ProxyCommand target) hardcoded its connection-level keep-alive toClientAliveInterval: 5s,ClientAliveCountMax: 2— a ~10s tolerance. That is an order of magnitude stricter than OpenSSH, so a brief network stall (e.g. the reported 39s) that a plainsshsession rides through closed the transport, which killed the container tunnel and tore down the user's SSH session.This defaults the tolerance to ~120s (
15s × 8), mirroring OpenSSH'sServerAliveInterval 30 × ServerAliveCountMax 4, and makes both knobs configurable viaDEVSY_SSH_KEEPALIVE_INTERVAL(Go duration or bare seconds) andDEVSY_SSH_KEEPALIVE_COUNT_MAX. Invalid/non-positive values fall back to the defaults.Relaxing the keep-alive is safe for the socket-cleanup path it was added for: stale per-connection agent socket dirs from genuinely dead peers are still reclaimed on server start via
SweepStaleAgentSockets().Out of scope
The secondary port-forward leak from #759 (
bind: address already in useon reconnect) is not addressed here — it needs separate tracing of the reconnect path.